package IC.AST;

public class ReturnStatement extends Statement
{
	private Expression _returnValue; // maybe null?
	
	public Object Visit(Visitor visitor) { return visitor.Visit(this); }
	
	public ReturnStatement(Interval interval, Expression returnValue)
	{
		super(interval);
		if (returnValue != null)
			GiveBirth(returnValue);
		_returnValue = returnValue;
	}
	
	public Expression GetReturnValue() { return _returnValue; }

}
